Skip to content

Comments

fix(#7): DI 적용하는 피드백 반영#10

Merged
Yoonchulchung merged 12 commits intodevfrom
feat/#7-add-CD-workflow
Jan 15, 2026
Merged

fix(#7): DI 적용하는 피드백 반영#10
Yoonchulchung merged 12 commits intodevfrom
feat/#7-add-CD-workflow

Conversation

@ParkJiYeoung8297
Copy link
Contributor

@ParkJiYeoung8297 ParkJiYeoung8297 commented Jan 15, 2026

related_to : #7

📝 작업 내용

CD 추가 과정에서 있었던 피드백을 반영했습니다. (PR #8 )

✅ 변경 사항

📷 스크린샷 (선택)

💬 리뷰어에게

아 로컬에서 PR을 안날리고 다시 했네요... 변경 사항 추가했습니다

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ParkJiYeoung8297, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 애플리케이션의 아키텍처를 개선하고 인프라를 강화하는 데 중점을 둡니다. 의존성 주입을 통해 코드의 구조를 현대화하고, 환경 변수 관리를 외부화하여 보안과 유연성을 높였습니다. 또한, JWT와 Spring Security를 활용한 강력한 인증 및 권한 부여 시스템을 구축하고, Swagger를 통해 API 문서화를 자동화했습니다. 마지막으로, 다양한 환경 설정을 도입하고 PostgreSQL 지원을 추가하여 개발 및 배포 프로세스를 최적화했습니다.

Highlights

  • 의존성 주입(DI) 적용: 코드 전반에 걸쳐 의존성 주입(DI) 패턴을 적용하여 @RequiredArgsConstructor를 사용하여 생성자 주입을 구현했습니다. 이는 코드의 유지보수성과 테스트 용이성을 향상시킵니다.
  • 환경 변수 관리 개선: .env 파일을 사용하여 환경 변수를 관리하도록 변경하고, docker-compose.yaml에서 이 변수들을 참조하도록 업데이트했습니다. 또한 .gitignore.env 파일을 추가하여 민감한 정보가 버전 관리 시스템에 포함되지 않도록 했습니다.
  • 보안 기능 통합 (JWT & Spring Security): JWT(JSON Web Token) 기반의 인증 및 권한 부여 시스템을 Spring Security와 통합했습니다. JwtAuthenticationFilter, JwtProvider, CustomUserDetails와 같은 새로운 클래스를 추가하여 토큰 생성, 검증 및 사용자 세부 정보 관리를 처리합니다. 또한 SecurityConfig를 통해 전반적인 보안 설정을 구성하고, CustomAccessDeniedHandlerCustomAuthEntryPoint를 통해 접근 거부 및 인증 실패 시의 응답을 표준화했습니다.
  • Swagger API 문서화 추가: build.gradle에 Swagger 의존성을 추가하고 SwaggerConfig를 구현하여 API 문서를 자동 생성하고 관리할 수 있도록 했습니다. 이는 API 사용자와 개발자 간의 소통을 원활하게 합니다.
  • 다중 환경 설정 및 PostgreSQL 지원: application-prod.ymlapplication-test.yml 파일을 추가하여 프로덕션 및 테스트 환경에 특화된 설정을 분리했습니다. 특히 테스트 환경을 위해 PostgreSQL 데이터베이스 지원을 추가하여 CI/CD 파이프라인에서의 테스트 유연성을 높였습니다.
  • API 응답 형식 표준화: ApiResponse.java 파일이 CustomResponse.java로 이름이 변경되었고, API 응답 형식을 더욱 표준화했습니다. GlobalExceptionHandler도 업데이트되어 CustomResponse를 사용하여 일관된 오류 응답을 제공합니다.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/cd-prod.yml
    • .github/workflows/pr-check.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

전반적으로 DI 적용 및 환경 변수 분리 등 이전 피드백이 잘 반영되었습니다. JWT 인증/인가, Swagger 설정, 프로필별 설정 분리 등 많은 부분이 개선되었습니다. 몇 가지 추가적인 개선점을 제안합니다. ObjectMapper는 매번 생성하기보다 Bean으로 주입받아 사용하는 것이 성능상 유리하며, 일부 필드의 접근 제어자를 명시적으로 private으로 지정하여 캡슐화를 강화하는 것이 좋습니다. 또한 최신 jjwt 라이브러리 사용법에 맞춰 코드를 수정하면 유지보수성을 높일 수 있습니다.

.claim("role", role)
.issuedAt(new Date(now))
.expiration(new Date(now + expireMillis))
.signWith(secretKey, SignatureAlgorithm.HS256)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

jjwt 라이브러리 0.12.x 버전부터는 signWith(Key, SignatureAlgorithm) 메서드보다 signWith(Key)를 사용하는 것이 권장됩니다. SecretKey를 사용하면 라이브러리가 알아서 적절한 HMAC 알고리즘(HS256, HS384, HS512)을 선택해줍니다. 코드를 최신 라이브러리 사용법에 맞게 수정하면 가독성과 유지보수성이 향상됩니다.

Suggested change
.signWith(secretKey, SignatureAlgorithm.HS256)
.signWith(secretKey)

Copy link
Member

@Yoonchulchung Yoonchulchung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

커밋 하셔도 됩니다

@ParkJiYeoung8297 ParkJiYeoung8297 self-assigned this Jan 15, 2026
@Yoonchulchung Yoonchulchung merged commit 47f6ed7 into dev Jan 15, 2026
1 check passed
@Yoonchulchung Yoonchulchung deleted the feat/#7-add-CD-workflow branch January 15, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants